#pragma once
#include <StaticMesh.h>

namespace grflib
{
	namespace engine
	{
		namespace aux
		{
			class CBgImageMesh : public CStaticMesh
			{
			public:
				CBgImageMesh(void);
				virtual ~CBgImageMesh(void);
                				
				virtual HRESULT OnResize(
					ID3D10Device *pd3dDevice, 
					IDXGISwapChain *pSwapChain,
					const DXGI_SURFACE_DESC *pBufferSurfaceDesc);
				virtual HRESULT PreRender(ID3D10Device *pd3dDevice,
					const D3DXMATRIX *pWorldMat,
					double fTime,
					float fElapsedTime,
					UINT pass);

				virtual grflib::engine::core::BBox<float> &GetBoundingBox(void);
                void SetMaterial(const std::string &materialName);
				float &AspectRatio(void) {return m_aspectRatio;}

			protected:
				void CreateMesh(void);
                static const UINT m_nVertex;
                static const UINT m_nIndex;
				float m_aspectRatio;
			};

		} //namespace aux
	} //namespace engine
} //namespace grflib